package lanqiao;
/**
 * @Project : AlgorithmLearning
 * @Package : LanQiao.PrepareForCompetition
 * @File : Q0185.java
 * @Author : WangRuoyu
 * @Date : 2023/3/26 10:55
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Q0185 {
    static final int N = 1000010;
    static int[] st;

    static int find(int x) {
        if (st[x] == x) return x;
        else {
            int father = find(st[x]);
            st[x] = father;
            return father;
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] words = br.readLine().split(" ");

        int n = Integer.parseInt(words[0]);
        st = new int[N];
        for (int i = 1; i < N; ++i) {
            st[i] = i;
        }
        int[] nums = new int[n + 1];
        words = br.readLine().split(" ");
        for (int i = 1; i <= n; ++i) {
            int x = Integer.parseInt(words[i - 1]);
            if (st[x] == x) {
                nums[i] = x;
                st[x]=x+1;
            } else {
                int father = find(x);
                nums[i] = father;
                st[father]=father+1;
            }
        }

        for (int i = 1; i <= n; ++i) {
            System.out.print(nums[i] + " ");
        }
    }
}
